<?php echo $this->render('header.phtml'); ?>
<h2><?php echo $this->escape($this->content_title);?></h2>

<?php /*
<font style="float:right;padding-bottom:5px;">
$languages = explode(',',LANGUAGES);
foreach($languages as $l) {
    echo '<a href="/article/index/lang/'.$l.'" title="'.ucfirst($l).'"><img src="/public/images/lang/'.$l.'.png" style="margin:3px;border: solid '.
    ($this->language==$l?'2px red':'1px #E7E7E7').';"/></a>';
}
</font> */ 
$link = '/article/edit/id/';
$deletelink = '/article/delete/id/';

?>
<table summary="Aticles" id="rounded-corner">
    <thead>
        <tr>
            <th class="rounded-company" scope="col"></th>
            <th class="rounded" scope="col">Alias</th>
            <th class="rounded" scope="col">Subject</th>
            <th class="rounded" scope="col">Category</th>
            <th class="rounded" scope="col">Published</th>
            <?php if($this->can_edit) { ?>
            <th class="rounded" scope="col">Edit</th>
            <?php } if($this->can_delete) { ?>
            <th class="rounded-q4" scope="col">Delete</th>
            <?php } ?>
        </tr>
    </thead>
    <!--<tfoot>
        <tr>
            <td class="rounded-foot-left" colspan="6"><em>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut.</em></td>
            <td class="rounded-foot-right">&nbsp;</td>

        </tr>
    </tfoot>-->
    <tbody>
<?php foreach($this->items as $obj) : ?>
        <tr>
            <td><input type="checkbox" name=""></td>
            <?php if($this->can_edit) { ?>
            <td><a href="<?php echo $link.$obj->id ?>"><?php echo $this->escape($obj->alias);?></a></td>
            <?php } else { ?>
            <td><?php echo $this->escape($obj->alias);?></td>
            <?php } ?>
            <td><?php echo $this->escape($obj->subject);?></td>
            <td><?php echo $this->escape($this->categories[$obj->category_id]);?></td>
            <td><?php echo $this->escape($obj->published);?></td>
            <?php if($this->can_edit) { ?>
            <td><a href="<?php echo $link.$obj->id ?>"><img border="0" title="" alt="" src="/public/images/user_edit.png"></a></td>
            <?php } if($this->can_delete) { ?>
            <td><a class="ask" href="<?php echo $deletelink.$obj->id ?>"><img border="0" title="" alt="" src="/public/images/trash.png"></a></td>
            <?php } ?>
        </tr>
<?php endforeach; ?>
               
    </tbody>
</table>
<?php if($this->can_add && $this->language == DEFAUL_LANGUAGE)  { ?>
<a class="bt_green" href="/article/add"><span class="bt_green_lft"></span><strong>Добавить</strong><span class="bt_green_r"></span></a>
<?php } ?>
<?php /* if($this->can_delete) { ?>
<a class="ask bt_red" href="/article/delete"><span class="bt_red_lft"></span><strong>Delete items</strong><span class="bt_red_r"></span></a>
<?php } */ ?>
<?php echo $this->render('footer.phtml'); ?>
